package losrebellos.lospistoleros.components.application.movieclip 
{
	import losrebellos.lospistoleros.components.application.IAbstractPApplication;
	import losrebellos.lospistoleros.core.controller.movieclip.IPControllerMovieClip;
	import losrebellos.lospistoleros.core.model.movieclip.IPModelMovieClip;
	import losrebellos.lospistoleros.core.view.movieclip.PMovieClip;

	import flash.errors.IllegalOperationError;

	/*
	 *
	 * @author los rebellos - ben@benoitvinay.com
	 *
	 */
	public class AbstractPApplicationMovieClip extends PMovieClip implements IAbstractPApplication
	{
		/*
		 *
		 * CONSTRUCTOR
		 *
		 */
		public function AbstractPApplicationMovieClip(name:String = null, type:String = null)
		{
			super(name, type);
		}
		
		
		/*
		 * 
		 * MVC
		 * 
		 */
		override protected function createModel():IPModelMovieClip
		{
			return new AbstractPApplicationModelMovieClip();
		}
		override protected function createController():IPControllerMovieClip
		{
			return new AbstractPApplicationControllerMovieClip(_model, this);
		}

		
		/*
		 * 
		 * CONTENT
		 * 
		 */
		public function createApplicationContent():void
		{
			throw new IllegalOperationError(">>> AbstractPApplicationMovieClip:createApplicationContent need to be overridden");
		}
		public function addApplicationContent():void
		{
			throw new IllegalOperationError(">>> AbstractPApplicationMovieClip:addApplicationContent need to be overridden");
		}
	}
}